***********************************************
**** Table A7: Robustness: Alternate Specifications	****
***********************************************

use "$dir/Data/analysis_main.dta", clear

eststo clear		
eststo: reghdfe n_productivity cash_postpay cash_announce blhrprod blhrprodsq blhrprod_miss bs_labor_30_miss future_fin_worry_miss i.pd if pd>0, vce(cl pid) absorb(roundgroup)
qui estadd local cont1 "N"
qui estadd local cont2 "N"
qui estadd local cont3 "N"	
qui estadd local cont4 "N"	
lincom cash_postpay - cash_announce
qui estadd scalar coef1 = r(estimate)
qui estadd scalar se1 = r(se)			
qui estadd scalar pval1 = 2*ttail(r(df),abs(r(estimate)/r(se)))	

eststo: reghdfe n_productivity cash_postpay cash_announce blhrprod blhrprodsq blhrprod_miss bs_labor_30_miss future_fin_worry_miss gotfin postsal i.pd if pd>0, vce(cl pid) absorb(roundgroup)
qui estadd local cont1 "Y"
qui estadd local cont2 "N"
qui estadd local cont3 "N"	
qui estadd local cont4 "N"	
lincom cash_postpay - cash_announce
qui estadd scalar coef1 = r(estimate)
qui estadd scalar se1 = r(se)			
qui estadd scalar pval1 = 2*ttail(r(df),abs(r(estimate)/r(se)))	


eststo: reghdfe n_productivity cash_postpay cash_announce blhrprod blhrprodsq blhrprod_miss bs_labor_30_miss future_fin_worry_miss gotfin postsal i.pd if pd>0 & attend==1, vce(cl pid) absorb(roundgroup)
qui estadd local cont1 "Y"
qui estadd local cont2 "Y"
qui estadd local cont3 "N"	
qui estadd local cont4 "N"	
lincom cash_postpay - cash_announce
qui estadd scalar coef1 = r(estimate)
qui estadd scalar se1 = r(se)			
qui estadd scalar pval1 = 2*ttail(r(df),abs(r(estimate)/r(se)))	

eststo: reghdfe n_productivity cash_postpay cash_announce blhrprod blhrprodsq blhrprod_miss bs_labor_30_miss future_fin_worry_miss gotfin postsal i.pd if pd>0 & attend==1 & survsample==1, vce(cl pid) absorb(roundgroup)
qui estadd local cont1 "Y"
qui estadd local cont2 "Y"
qui estadd local cont3 "Y"	
qui estadd local cont4 "N"	
lincom cash_postpay - cash_announce
qui estadd scalar coef1 = r(estimate)
qui estadd scalar se1 = r(se)			
qui estadd scalar pval1 = 2*ttail(r(df),abs(r(estimate)/r(se)))	

eststo: reghdfe n_productivity cash_postpay cash_announce blhrprod blhrprodsq blhrprod_miss bs_labor_30_miss future_fin_worry_miss gotfin postsal i.pd if pd>0 & attend==1 & survsample==1 & gotfin==0, vce(cl pid) absorb(roundgroup)
qui estadd local cont1 "Y"
qui estadd local cont2 "Y"
qui estadd local cont3 "Y"	
qui estadd local cont4 "Y"	
lincom cash_postpay - cash_announce
qui estadd scalar coef1 = r(estimate)
qui estadd scalar se1 = r(se)			
qui estadd scalar pval1 = 2*ttail(r(df),abs(r(estimate)/r(se)))	

label var cash_postpay "Cash $\times$ Post-pay" 	
label var cash_announce "Cash $\times$ Announcement period" 	

#delimit ;
local tablerow cash_postpay cash_announce ;

esttab using "$oa/$t/Table_A7.tex", 
    b(3) se booktabs star(* .1 ** .05 *** .01) nonotes nomtitles  
    replace label style(tex) gaps keep(`tablerow') order(`tablerow') 
    stats(cont1 cont2 cont3 cont4 pval1 N, labels("Priming controls" "Exclude absent workers" "Answered baseline questions" "Exclude primed workers" "P-val: Cash $\times$ Post-pay = Cash $\times$ Announcement" "N: worker-hours") fmt(%20s %20s %20s %20s %9.3fc %9.0fc)) 
	prehead("{\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} \begin{tabular}     {@{\extracolsep{4pt}}l*{10}{>{\centering\arraybackslash}m{2.4cm}}@{}}     
	\toprule  	
	\multicolumn{1}{l}{}     &\multicolumn{5}{c}{\textbf{Hourly Production}}  \bigstrut    \\
    \cline{2-6} \addlinespace       
	") ;
#delimit cr	

